package cn.edu.jxust.common.domain.web.api.air;

import cn.edu.jxust.common.response.Result;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author QiuKangming
 * @version 1.0
 * @description
 * @since 2020/09/15 14:41
 */
@RequestMapping("/api/aqi")
public interface IAqiController {

    /**
     * 根据时间段和 Aqi 类型查询 Aqi 数据
     * @param deviceId 设备id号
     * @param beginTime 开始时间
     * @param endTime 结束时间
     * @param aqiType Aqi类型
     * @return Result
     */
    @GetMapping
    @RequiresPermissions("air:aqi")
    Result getAqiList(
            @RequestParam(name = "deviceId") Integer deviceId,
            @RequestParam(name = "beginTime") String beginTime,
            @RequestParam(name = "endTime") String endTime,
            @RequestParam(name = "aqiType") String aqiType);

    /**
     * 大气单项污染指数
     * @param deviceId 设备id号
     * @param airType 气体类型id号
     * @param beginDate 开始时间
     * @param endDate 结束时间
     * @return Result
     */
    @GetMapping("/oneair")
    @RequiresPermissions("air:pollution_one")
    Result getOneAirListPage(@RequestParam(name = "deviceId") Integer deviceId,
                             @RequestParam(name = "airType") Integer airType,
                             @RequestParam(name = "beginDate") String beginDate,
                             @RequestParam(name = "endDate") String endDate);



}
